﻿#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    ui->label_2->setScaledContents(true);
    setWindowFlag(Qt::FramelessWindowHint);//设置无边框
    p=(QApplication*)QApplication::instance();
    QFile file(":/new.qss");
    if(file.open(QIODevice::ReadOnly|QIODevice::Text))
    {
        QTextStream out(&file);
        out.setCodec("UTF-8");
        QString style=out.readAll();
        file.close();
        p->setStyleSheet(style);
    }
    QPixmap *pm=new QPixmap();
    bool ret=pm->load(":/2.jpg");
    if(ret==true)
    {

    }
}

MainWindow::~MainWindow()
{
    delete ui;
}

